/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-05-07
 * Time: 9:07
 */

class Message<T> {
    private T message ;
    public T getMessage() {
        return message;
    }
    public void setMessage(T message) {
        this.message = message;
    }
}

public class Test2 {
    public static void main(String[] args) {
        Message<String> message1 = new Message<>() ;
        message1.setMessage("!!!!!!!!!");
        fun(message1);

        Message<Integer> message2 = new Message<>() ;
        message2.setMessage(100);
        fun(message2);
    }
    public static void fun(Message<?> temp){
        System.out.println(temp.getMessage());
    }
}
